package com.xgzit.common.exception;

/**
 * 自定义 没有库存异常，继承运行时异常
 * @Author xgz
 * @Date 2021-06-30 22:27
 */

public class NoStockException extends RuntimeException {
    /** 商品id **/
    private Long skuId;

    public NoStockException(Long skuId){
        super("商品id是："+ skuId+" 没有足够的库存了");
    }
    public NoStockException(){
        super(" 商品库存不足");
    }
    public Long getSkuId(){
        return this.skuId;
    }
    public void setSkuId(Long skuId){
        this.skuId = skuId;
    }
}
